Python 3
import pandas as pdimport seaborn as snsimport numpy as npimport matplotlib.pyplot as pltpd.set_option('display.max_row',13)pd.set_option('display.max_column',13)#c'est fonction de pandasdata=pd.read_csv("Shill Bidding Dataset.csv",sep=',')#c'est fonction de pandasdata.shape#data.dtypes.value_counts().plot.pie()#afficher la comanbaire de chaque type.c'est fonction de pandas#data.head()#data.columns(6321, 13)
da=data.copy()da=da.drop(columns=['Bidder_ID'],axis=1)for col in da: plt.figure() da[col].plot(kind = "kde")for col in da:#on parcoure les ariable que on a et on affiche les variable de type float #print(col) plt.figure()#permit d'afficher chaque variable dans un graphe separer sns.distplot(da[col])/home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning)
for col in da: da[col].plot(kind = "hist", normed = True, color = "lightgrey") da[col].plot(kind = "kde")--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-11-37b4dd6e9701> in <module> 1 for col in da: ----> 2 da[col].plot(kind = "hist", normed = True, color = "lightgrey") 3 da[col].plot(kind = "kde") ~/anaconda3/lib/python3.8/site-packages/pandas/plotting/_core.py in __call__(self, *args, **kwargs) 947 data.columns = label_name 948 --> 949 return plot_backend.plot(data, kind=kind, **kwargs) 950 951 __call__.__doc__ = __doc__ ~/anaconda3/lib/python3.8/site-packages/pandas/plotting/_matplotlib/__init__.py in plot(data, kind, **kwargs) 59 kwargs["ax"] = getattr(ax, "left_ax", ax) 60 plot_obj = PLOT_CLASSES[kind](data, **kwargs) ---> 61 plot_obj.generate() 62 plot_obj.draw() 63 return plot_obj.result ~/anaconda3/lib/python3.8/site-packages/pandas/plotting/_matplotlib/core.py in generate(self) 269 self._compute_plot_data() 270 self._setup_subplots() --> 271 self._make_plot() 272 self._add_table() 273 self._make_legend() ~/anaconda3/lib/python3.8/site-packages/pandas/plotting/_matplotlib/hist.py in _make_plot(self) 81 kwds["weights"] = weights[:, i] 82 ---> 83 artists = self._plot(ax, y, column_num=i, stacking_id=stacking_id, **kwds) 84 self._add_legend_handle(artists[0], label, index=i) 85 ~/anaconda3/lib/python3.8/site-packages/pandas/plotting/_matplotlib/hist.py in _plot(cls, ax, y, style, bins, bottom, column_num, stacking_id, **kwds) 52 bottom = bottom + cls._get_stacked_values(ax, stacking_id, base, kwds["label"]) 53 # ignore style ---> 54 n, bins, patches = ax.hist(y, bins=bins, bottom=bottom, **kwds) 55 cls._update_stacker(ax, stacking_id, n) 56 return patches ~/anaconda3/lib/python3.8/site-packages/matplotlib/__init__.py in inner(ax, data, *args, **kwargs) 1436 def inner(ax, *args, data=None, **kwargs): 1437 if data is None: -> 1438 return func(ax, *map(sanitize_sequence, args), **kwargs) 1439 1440 bound = new_sig.bind(ax, *args, **kwargs) ~/anaconda3/lib/python3.8/site-packages/matplotlib/axes/_axes.py in hist(self, x, bins, range, density, weights, cumulative, bottom, histtype, align, orientation, rwidth, log, color, label, stacked, **kwargs) 6818 if patch: 6819 p = patch[0] -> 6820 p.update(kwargs) 6821 if lbl is not None: 6822 p.set_label(lbl) ~/anaconda3/lib/python3.8/site-packages/matplotlib/artist.py in update(self, props) 994 func = getattr(self, f"set_{k}", None) 995 if not callable(func): --> 996 raise AttributeError(f"{type(self).__name__!r} object " 997 f"has no property {k!r}") 998 ret.append(func(v)) AttributeError: 'Rectangle' object has no property 'normed'
for col in da: da.boxplot(column= da[col])--------------------------------------------------------------------------- KeyError Traceback (most recent call last) <ipython-input-31-4d3a6392dc18> in <module> 1 for col in da: ----> 2 da.boxplot(column= da[col]) ~/anaconda3/lib/python3.8/site-packages/pandas/plotting/_core.py in boxplot_frame(self, column, by, ax, fontsize, rot, grid, figsize, layout, return_type, backend, **kwargs) 492 ): 493 plot_backend = _get_plot_backend(backend) --> 494 return plot_backend.boxplot_frame( 495 self, 496 column=column, ~/anaconda3/lib/python3.8/site-packages/pandas/plotting/_matplotlib/boxplot.py in boxplot_frame(self, column, by, ax, fontsize, rot, grid, figsize, layout, return_type, **kwds) 378 import matplotlib.pyplot as plt 379 --> 380 ax = boxplot( 381 self, 382 column=column, ~/anaconda3/lib/python3.8/site-packages/pandas/plotting/_matplotlib/boxplot.py in boxplot(data, column, by, ax, fontsize, rot, grid, figsize, layout, return_type, **kwds) 355 columns = data.columns 356 else: --> 357 data = data[columns] 358 359 result = plot_group(columns, data.values.T, ax) ~/anaconda3/lib/python3.8/site-packages/pandas/core/frame.py in __getitem__(self, key) 2906 if is_iterator(key): 2907 key = list(key) -> 2908 indexer = self.loc._get_listlike_indexer(key, axis=1, raise_missing=True)[1] 2909 2910 # take() does not accept boolean indexers ~/anaconda3/lib/python3.8/site-packages/pandas/core/indexing.py in _get_listlike_indexer(self, key, axis, raise_missing) 1252 keyarr, indexer, new_indexer = ax._reindex_non_unique(keyarr) 1253 -> 1254 self._validate_read_indexer(keyarr, indexer, axis, raise_missing=raise_missing) 1255 return keyarr, indexer 1256 ~/anaconda3/lib/python3.8/site-packages/pandas/core/indexing.py in _validate_read_indexer(self, key, indexer, axis, raise_missing) 1296 if missing == len(indexer): 1297 axis_name = self.obj._get_axis_name(axis) -> 1298 raise KeyError(f"None of [{key}] are in the [{axis_name}]") 1299 1300 # We (temporarily) allow for some missing keys with .loc, except in KeyError: "None of [Index([(0.2, 0.024390244, 0.14285714300000002, 0.1, 0.051282050999999995, 0.038461537999999997, 0.4, 0.137931034, 0.12195122, 0.155172414, 0.6, 0.5, 0.017241378999999998, 0.041322314, 0.14285714300000002, 0.007246376999999999, 0.01, 0.025641026, 0.172413793, 0.010309278, 0.25, 0.023255814, 0.041666667000000004, 0.111111111, 0.25, 0.052631579000000005, 1.0, 0.14285714300000002, 0.017391304, 1.0, 0.045454545, 0.070175439, 0.066666667, 0.222222222, 0.052631579000000005, 0.043478261, 0.15789473699999998, 0.571428571, 0.052631579000000005, 0.009803922, 0.21052631600000002, 0.481481481, 0.10344827599999999, 0.058823529000000006, 0.022727273, 0.025974026, 0.043478261, 0.071428571, 0.020833333, 0.025974026, 0.011764706000000002, 0.034482759, 0.14285714300000002, 0.111111111, 0.2, 0.083333333, 0.014492753999999998, 0.181818182, 0.10526315800000001, 0.125, 0.4, 0.1, 0.14285714300000002, 0.010204082, 0.5, 0.04, 0.010416667, 0.012987013, 0.027027027000000002, 0.0, 0.07826087, 0.75, 0.025, 0.060606060999999996, 0.054054054000000004, 0.026666667, 1.0, 0.015151515, 0.028571429, 0.333333333, 0.166666667, 0.008695652, 0.012084592, 0.056603774, 0.033333333, 0.08, 0.75, 0.014084507, 0.090909091, 0.26666666699999997, 0.18, 0.090909091, 0.05, 0.04, 0.025641026, 0.034482759, 0.0, 0.028571429, 0.46666666700000003, 0.454545455, ...)], dtype='object')] are in the [columns]"
xxxxxxxxxx#data.isna()#elle verifier si une valeur is not a number c'est fonction de pandasdata.describe()#permet de décrire toutes les variables quantitatives d'un jeu de données directement| Record_ID | Auction_ID | Bidder_Tendency | Bidding_Ratio | Successive_Outbidding | Last_Bidding | Auction_Bids | Starting_Price_Average | Early_Bidding | Winning_Ratio | Auction_Duration | Class | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| count | 6321.000000 | 6321.000000 | 6321.000000 | 6321.000000 | 6321.000000 | 6321.000000 | 6321.000000 | 6321.000000 | 6321.000000 | 6321.000000 | 6321.000000 | 6321.000000 |
| mean | 7535.829457 | 1241.388230 | 0.142541 | 0.127670 | 0.103781 | 0.463119 | 0.231606 | 0.472821 | 0.430683 | 0.367731 | 4.615093 | 0.106787 |
| std | 4364.759137 | 735.770789 | 0.197084 | 0.131530 | 0.279698 | 0.380097 | 0.255252 | 0.489912 | 0.380785 | 0.436573 | 2.466629 | 0.308867 |
| min | 1.000000 | 5.000000 | 0.000000 | 0.011765 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 0.000000 | 1.000000 | 0.000000 |
| 25% | 3778.000000 | 589.000000 | 0.027027 | 0.043478 | 0.000000 | 0.047928 | 0.000000 | 0.000000 | 0.026620 | 0.000000 | 3.000000 | 0.000000 |
| 50% | 7591.000000 | 1246.000000 | 0.062500 | 0.083333 | 0.000000 | 0.440937 | 0.142857 | 0.000000 | 0.360104 | 0.000000 | 5.000000 | 0.000000 |
| 75% | 11277.000000 | 1867.000000 | 0.166667 | 0.166667 | 0.000000 | 0.860363 | 0.454545 | 0.993593 | 0.826761 | 0.851852 | 7.000000 | 0.000000 |
| max | 15144.000000 | 2538.000000 | 1.000000 | 1.000000 | 1.000000 | 0.999900 | 0.788235 | 0.999935 | 0.999900 | 1.000000 | 10.000000 | 1.000000 |
xxxxxxxxxxplt.figure(figsize=(20,10))sns.heatmap(data.isna())#une fonction de seaborn <AxesSubplot:>
xxxxxxxxxxdata.isna().sum()/data.shape[0]#indique le nombre de variable manquante Record_ID 0.0 Auction_ID 0.0 Bidder_ID 0.0 Bidder_Tendency 0.0 Bidding_Ratio 0.0 Successive_Outbidding 0.0 Last_Bidding 0.0 Auction_Bids 0.0 Starting_Price_Average 0.0 Early_Bidding 0.0 Winning_Ratio 0.0 Auction_Duration 0.0 Class 0.0 dtype: float64
xxxxxxxxxxdata.isna().sum()/data.shape[0]<0.9Record_ID True Auction_ID True Bidder_ID True Bidder_Tendency True Bidding_Ratio True Successive_Outbidding True Last_Bidding True Auction_Bids True Starting_Price_Average True Early_Bidding True Winning_Ratio True Auction_Duration True Class True dtype: bool
data[data.columns[data.isna().sum()/data.shape[0]<0.9]]#la pour éliminer les variable qui en un porcentage + de 0.9 de valeurs NAN| Record_ID | Auction_ID | Bidder_ID | Bidder_Tendency | Bidding_Ratio | Successive_Outbidding | Last_Bidding | Auction_Bids | Starting_Price_Average | Early_Bidding | Winning_Ratio | Auction_Duration | Class | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | 732 | _***i | 0.200000 | 0.400000 | 0.0 | 0.000028 | 0.000000 | 0.993593 | 0.000028 | 0.666667 | 5 | 0 |
| 1 | 2 | 732 | g***r | 0.024390 | 0.200000 | 0.0 | 0.013123 | 0.000000 | 0.993593 | 0.013123 | 0.944444 | 5 | 0 |
| 2 | 3 | 732 | t***p | 0.142857 | 0.200000 | 0.0 | 0.003042 | 0.000000 | 0.993593 | 0.003042 | 1.000000 | 5 | 0 |
| 3 | 4 | 732 | 7***n | 0.100000 | 0.200000 | 0.0 | 0.097477 | 0.000000 | 0.993593 | 0.097477 | 1.000000 | 5 | 0 |
| 4 | 5 | 900 | z***z | 0.051282 | 0.222222 | 0.0 | 0.001318 | 0.000000 | 0.000000 | 0.001242 | 0.500000 | 7 | 0 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 6316 | 15129 | 760 | l***t | 0.333333 | 0.160000 | 1.0 | 0.738557 | 0.280000 | 0.993593 | 0.686358 | 0.888889 | 3 | 1 |
| 6317 | 15137 | 2481 | s***s | 0.030612 | 0.130435 | 0.0 | 0.005754 | 0.217391 | 0.993593 | 0.000010 | 0.878788 | 7 | 0 |
| 6318 | 15138 | 2481 | h***t | 0.055556 | 0.043478 | 0.0 | 0.015663 | 0.217391 | 0.993593 | 0.015663 | 0.000000 | 7 | 0 |
| 6319 | 15139 | 2481 | d***d | 0.076923 | 0.086957 | 0.0 | 0.068694 | 0.217391 | 0.993593 | 0.000415 | 0.000000 | 7 | 0 |
| 6320 | 15144 | 2481 | a***l | 0.016393 | 0.043478 | 0.0 | 0.340351 | 0.217391 | 0.993593 | 0.340351 | 0.000000 | 7 | 0 |
6321 rows × 13 columns
x
da=data.copy()da=da.drop(columns=['Record_ID','Auction_ID','Bidder_ID'],axis=1)da['Class'].value_counts(normalize=True)#afficher le porcentage de chaque type de cette variable.0 0.893213 1 0.106787 Name: Class, dtype: float64
for col in da:#on parcoure les ariable que on a et on affiche les variable de type float #print(col) plt.figure()#permit d'afficher chaque variable dans un graphe separer sns.distplot(da[col])/home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning)
da['Class'].unique()#elle pricise les types de donnees de cette variables array([0, 1])
xxxxxxxxxxfor col in da:#on parcoure les variable de type int print(f'{col :-<50}{da[col].unique()}')#affiche les catigure de donnee de chaque variable de ce type. #plt.figure()#permit d'afficher chaque variable dans un graphe separer #sns.distplot(data[col])Bidder_Tendency-----------------------------------[0.2 0.02439024 0.14285714 0.1 0.05128205 0.03846154 0.4 0.13793103 0.12195122 0.15517241 0.6 0.5 0.01724138 0.04132231 0.00724638 0.01 0.02564103 0.17241379 0.01030928 0.25 0.02325581 0.04166667 0.11111111 0.05263158 1. 0.0173913 0.04545454 0.07017544 0.06666667 0.22222222 0.04347826 0.15789474 0.57142857 0.00980392 0.21052632 0.48148148 0.10344828 0.05882353 0.02272727 0.02597403 0.07142857 0.02083333 0.01176471 0.03448276 0.08333333 0.01449275 0.18181818 0.10526316 0.125 0.01020408 0.04 0.01041667 0.01298701 0.02702703 0. 0.07826087 0.75 0.025 0.06060606 0.05405405 0.02666667 0.01515152 0.02857143 0.33333333 0.16666667 0.00869565 0.01208459 0.05660377 0.03333333 0.08 0.01408451 0.09090909 0.26666667 0.18 0.05 0.46666667 0.45454545 0.03030303 0.8 0.02608696 0.08571429 0.42424242 0.03703704 0.03076923 0.00302115 0.00925926 0.06722689 0.00819672 0.05555556 0.07692308 0.01492537 0.07317073 0.15151515 0.17647059 0.23529412 0.02222222 0.03623188 0.06976744 0.03571429 0.13043478 0.02352941 0.00826446 0.13513513 0.12987013 0.02416918 0.1875 0.0060423 0.875 0.01886793 0.11538461 0.35714286 0.03 0.05172414 0.02247191 0.03125 0.10714286 0.07407407 0.02941176 0.0625 0.01694915 0.04761905 0.02479339 0.58333333 0.1125 0.01086956 0.01162791 0.04938272 0.27272727 0.28571429 0.03508772 0.0106383 0.15625 0.04705882 0.01612903 0.44444444 0.05714286 0.03225807 0.11764706 0.12698413 0.02173913 0.01333333 0.09302326 0.51851852 0.04081633 0.20512821 0.31578947 0.01639344 0.02061856 0.71428571 0.01754386 0.69230769 0.03278689 0.04651163 0.23076923 0.42857143 0.01234568 0.09523809 0.66666667 0.35294118 0.32307692 0.10606061 0.21428571 0.60465116 0.24 0.01123596 0.15384615 0.02816901 0.03361344 0.01666667 0.03773585 0.07792208 0.01652893 0.02985075 0.38461538 0.11627907 0.0125 0.14634146 0.3125 0.01680672 0.01538462 0.25862069 0.47368421 0.02469136 0.14705882 0.04901961 0.17346939 0.04444444 0.30434783 0.00840336 0.55555556 0.08695652 0.13461539 0.02521008 0.13333333 0.20833333 0.12790698 0.01851852 0.16 0.04918033 0.12903226 0.02040816 0.23333333 0.00680272 0.54545455 0.13580247 0.83333333 0.05617978 0.05797101 0.03174603 0.95 0.08823529 0.19402985 0.09259259 0.2173913 0.24137931 0.03305785 0.16494845 0.01360544 0.34090909 0.0212766 0.18918919 0.22727273 0.17391304 0.00906344 0.12121212 0.26315789 0.075 0.09859155 0.08108108 0.09375 0.24675325 0.3 0.01960784 0.02 0.625 0.12 0.04878049 0.29411765 0.10769231 0.08641975 0.04615385 0.14035088 0.05194805 0.06557377 0.18518519 0.46428571 0.34782609 0.06 0.08163265 0.46153846 0.54166667 0.03896104 0.28205128 0.01923077 0.01812689 0.77777778 0.05970149 0.02721088 0.06896552 0.61538461 0.30769231 0.02777778 0.19354839 0.11 0.11340206 0.24242424 0.375 0.02631579 0.41666667 0.52 0.06086957 0.35 0.05633803 0.10810811 0.17857143 0.72727273 0.19047619 0.39534884 0.03191489 0.03370786 0.20588235 0.73333333 0.34285714 0.20689655 0.06122449 0.09756098 0.08510638 0.36363636 0.13636364 0.06818182 0.33802817 0.07446809 0.0862069 0.12068966 0.7 0.08474576 0.40909091 0.0462963 0.04123711 0.91666667 0.16129032 0.01510574 0.01587302 0.11702128 0.15 0.02459016 0.03488372 0.23255814 0.06493507 0.22580645 0.90909091 0.92857143 0.05333333 0.21212121 0.06956522 0.11428571 0.07894737 0.14814815 0.09016393 0.16216216 0.2972973 0.07971014 0.05434783 0.06382979 0.67567568 0.04098361 0.9 0.36 0.15217391 0.45070423 0.16883117 0.47058824 0.27777778 0.05740181 0.02114804 0.04225352 0.07563025 0.09230769 0.12359551 0.11666667 0.48484848 0.1025641 0.84210526 0.45 0.31818182 0.35483871 0.72413793 0.91304348 0.07438016 0.03478261 0.04477612 0.0375 0.82758621 0.0338983 0.10084034 0.80952381 0.06862745 0.88888889 0.38095238 0.18867924 0.30555556 0.15909091 0.03401361 0.17142857 0.05102041 0.27027027 0.53846154 0.38636364 0.05319149 0.11320755 0.07377049 0.275 0.39285714 0.8125 0.85714286 0.11363636 0.05084746 0.04255319 0.15957447 0.17213115 0.28 0.26086957 0.09836066 0.34883721 0.76923077 0.13888889 0.0754717 0.4375 0.09333333 0.25714286 0.13432836 0.52173913 0.63636364 0.05154639 0.10204082 0.53333333 0.06521739 0.05737705 0.06451613 0.10638298 0.15555556 0.19230769 0.58823529 0.03092784 0.06779661 0.15730337 0.08450704 0.48275862 0.10416667 0.39583333 0.04958678 0.23809524 0.03021148 0.10869565 0.10784314 0.19565217 0.06349206 0.0483871 0.06481481 0.68421053 0.22857143 0.26923077 0.06185567 0.21768708 0.08888889 0.38 0.94444444 0.09677419 0.08955224 0.12820513 0.31428571 0.04494382 0.0877193 0.03061224 0.06172839 0.58974359 0.43103448 0.41025641 0.52941176 0.20454545 0.95454545 0.25925926 0.12962963 0.84615385 0.1011236 0.1509434 0.38709677 0.57407407 0.30645161 0.05217391 0.65217391 0.3559322 0.28813559 0.0326087 0.11570248 0.21621622 0.03323263 0.07843137 0.57894737 0.31111111 0.43478261 0.10447761 0.70588235 0.225 0.64705882 0.15584416 0.86842105 0.47619048 0.24528302 0.47826087 0.21875 0.89655172 0.55 0.425 0.32 0.02719033 0.12173913 0.32142857 0.03529412 0.07462687 0.04201681 0.10144928 0.55172414 0.42352941 0.52631579 0.10666667 0.23913044 0.28169014 0.59259259] Bidding_Ratio-------------------------------------[0.4 0.2 0.22222222 0.11111111 0.44444444 0.18518519 0.34615385 0.5625 0.10526316 0.05263158 0.20833333 0.04166667 0.03703704 0.05555556 0.14285714 0.71428571 0.15789474 0.6 0.08333333 0.09090909 0.03030303 0.16666667 0.375 0.66666667 0.125 0.02380952 0.23529412 0.26 0.13636364 0.04545454 0.11764706 0.05882353 0.025 0.01724138 0.03448276 0.1 0.3 0.05 0.07692308 0.03846154 0.15151515 0.21951219 0.07317073 0.04347826 0.03333333 0.03225807 0.12903226 0.09677419 0.08695652 0.06521739 0.06666667 0.29032258 0.02941176 0.09375 0.03125 0.04 0.28 0.04878049 0.09756098 0.05454545 0.23076923 0.30769231 0.11538461 0.21428571 0.03571429 0.3125 0.1875 0.25 0.0625 0.26315789 0.33333333 0.27272727 0.02173913 0.13043478 0.18181818 0.16129032 0.2173913 0.17391304 0.35714286 0.22580645 0.07142857 0.15384615 0.06451613 0.06 0.625 0.02857143 0.05714286 0.17647059 0.35294118 0.15217391 0.41666667 0.08823529 0.02631579 0.13157895 0.07894737 0.02083333 0.28571429 0.77777778 0.8 0.42857143 0.0212766 0.29787234 0.04255319 0.08163265 0.02040816 0.02439024 0.20689655 0.10344828 0.26666667 0.26829268 0.01818182 0.525 0.21212121 0.24242424 0.02 0.52 0.07407407 0.46153846 0.57142857 0.83333333 0.02777778 0.13333333 0.01851852 0.5 0.04761905 0.10638298 0.02325581 0.06382979 0.25862069 0.01754386 0.14705882 0.02222222 0.19230769 0.08888889 0.15 0.58333333 0.38461538 0.14634146 0.41176471 0.34375 0.05084746 0.06779661 0.01694915 0.52631579 0.44 0.06578947 0.05172414 0.39393939 1. 0.7 0.42105263 0.76190476 0.55555556 0.09523809 0.19047619 0.38095238 0.23333333 0.19148936 0.32758621 0.12 0.07017544 0.01315789 0.06060606 0.36363636 0.08 0.22857143 0.03636364 0.20588235 0.0483871 0.14814815 0.13888889 0.36111111 0.2962963 0.75 0.075 0.325 0.05128205 0.02564103 0.01612903 0.08064516 0.11290323 0.19354839 0.06896552 0.11428571 0.17142857 0.34782609 0.0877193 0.39285714 0.10714286 0.27777778 0.52380952 0.01960784 0.1372549 0.03921569 0.04081633 0.16949153 0.41935484 0.24137931 0.54545455 0.175 0.03174603 0.21052632 0.20408163 0.81818182 0.06976744 0.03947368 0.53333333 0.80952381 0.78571429 0.48 0.26086957 0.13793103 0.72727273 0.36842105 0.17021277 0.01587302 0.08510638 0.18918919 0.13513513 0.1627907 0.10204082 0.03508772 0.64705882 0.24444444 0.20512821 0.22727273 0.52941176 0.275 0.16326531 0.53488372 0.06122449 0.17857143 0.45454545 0.08571429 0.05405405 0.27027027 0.08108108 0.02702703 0.56521739 0.16 0.48275862 0.06349206 0.32352941 0.40740741 0.58823529 0.85714286 0.58181818 0.14545454 0.48148148 0.34042553 0.09302326 0.54166667 0.01785714 0.33928571 0.17460317 0.46666667 0.74074074 0.04444444 0.47058824 0.29411765 0.61538461 0.34177215 0.53846154 0.24 0.31428571 0.63636364 0.45652174 0.38888889 0.31578947 0.40677966 0.58695652 0.62962963 0.4375 0.32 0.06329114 0.02531646 0.01265823 0.03797468 0.07594937 0.17721519 0.07936508 0.51851852 0.04651163 0.01886793 0.15555556 0.26984127 0.01176471 0.47368421 0.17741936 0.44827586 0.05063291 0.12698413 0.17777778 0.32258064 0.07058823 0.31034483 0.04705882 0.02352941 0.26190476 0.23809524 0.875 0.14035088 0.03773585 0.64285714 0.11320755 0.13207547 0.17241379 0.03529412 0.21875 0.08235294 0.4137931 0.30434783 0.18604651 0.3030303 0.12121212 0.05660377 0.41304348 0.25641026 0.10588235 0.01639344 0.13114754 0.04918033 0.08196721 0.20754717 0.10909091 0.23636364 0.11627907 0.12820513 0.27906977 0.29166667 0.15625 0.02272727 0.52459016 0.03278689 0.10869565 0.07272727 0.22352941 0.68 0.25925926 0.11904762 0.15909091 0.73913043 0.47619048 0.09433962 0.0754717 0.27058824 0.34285714 0.96153846 0.25714286 0.32653061 0.2368421 0.10416667 0.56 0.14583333 0.35483871 0.33962264 0.14117647 0.24705882 0.07843137 0.05357143 0.01538462 0.12307692 0.17948718 0.32432432 0.16216216 0.16981132 0.28301887 0.7948718 0.40425532 0.12765957 0.40384615 0.01923077 0.04615385 0.30357143 0.1025641 0.43478261 0.09615385 0.05769231 0.25490196 0.06153846 0.03076923 0.61111111 0.88636364 0.825 0.45833333 0.12244898 0.34693878 0.25806452 0.13846154 0.31111111 0.26923077 0.38709677 0.10769231 0.4516129 0.22 0.37209302 0.58064516 0.45238095 0.20930233 0.14 ] Successive_Outbidding-----------------------------[0. 1. 0.5] Last_Bidding--------------------------------------[2.77778000e-05 1.31226852e-02 3.04166670e-03 ... 1.56630291e-02 6.86937831e-02 3.40350529e-01] Auction_Bids--------------------------------------[0. 0.33333333 0.30769231 0.05263158 0.25 0.45454545 0.57142857 0.64 0.18181818 0.55 0.68965517 0.56097561 0.60869565 0.4 0.41935484 0.47058824 0.4375 0.28 0.67272727 0.14285714 0.35714286 0.48571429 0.1 0.52631579 0.625 0.5 0.61702128 0.63265306 0.37931034 0.66666667 0.58139535 0.68421053 0.6 0.69491525 0.76315789 0.67857143 0.70967742 0.2173913 0.53846154 0.64705882 0.71428571 0.51351351 0.7721519 0.66037736 0.78823529 0.70491803 0.59090909 0.72307692 0.65384615] Starting_Price_Average----------------------------[0.99359281 0. 0.9935281 0.99935281 0.99993528 0.96123329 0.93534567 0.67646948 0.93528095 0.67640476 0.99514607 0.54696667 0.96764048 0.98712091 0.55305026 0.99889978 0.93560455 0.51460715 0.82525857 0.96770519 0.92958568 0.80584286] Early_Bidding-------------------------------------[2.77778000e-05 1.31226852e-02 3.04166670e-03 ... 6.86358025e-01 1.56630291e-02 3.40350529e-01] Winning_Ratio-------------------------------------[0.66666667 0.94444444 1. 0.5 0.8 0.75 0.61111111 0.6 0. 0.81818182 0.93333333 0.84210526 0.79310345 0.72727273 0.83333333 0.9 0.77777778 0.7 0.86567164 0.90909091 0.87755102 0.73684211 0.85714286 0.84821429 0.82352941 0.86666667 0.76190476 0.7826087 0.75757576 0.76923077 0.88888889 0.93548387 0.92307692 0.91666667 0.875 0.88235294 0.95454545 0.88571429 0.82142857 0.94736842 0.92857143 0.80952381 0.89189189 0.92682927 0.84615385 0.92592593 0.33333333 0.85185185 0.625 0.63636364 0.9375 0.71428571 0.76 0.84375 0.86363636 0.77419355 0.80645161 0.87878788 0.8125 0.64285714 0.88 0.90322581 0.55555556 0.95 0.88461539 0.61538461 0.94117647 0.97674419 0.57142857 0.78947368 0.91304348 0.4 ] Auction_Duration----------------------------------[ 5 7 1 3 10] Class---------------------------------------------[0 1]
xxxxxxxxxxfor col in da: plt.figure() da[col].value_counts().plot.pie() #sns.distplot(data[col])data_Positif=da[da['Class']==0]data_Positif| Record_ID | Auction_ID | Bidder_Tendency | Bidding_Ratio | Successive_Outbidding | Last_Bidding | Auction_Bids | Starting_Price_Average | Early_Bidding | Winning_Ratio | Auction_Duration | Class | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | 732 | 0.200000 | 0.400000 | 0.0 | 0.000028 | 0.000000 | 0.993593 | 0.000028 | 0.666667 | 5 | 0 |
| 1 | 2 | 732 | 0.024390 | 0.200000 | 0.0 | 0.013123 | 0.000000 | 0.993593 | 0.013123 | 0.944444 | 5 | 0 |
| 2 | 3 | 732 | 0.142857 | 0.200000 | 0.0 | 0.003042 | 0.000000 | 0.993593 | 0.003042 | 1.000000 | 5 | 0 |
| 3 | 4 | 732 | 0.100000 | 0.200000 | 0.0 | 0.097477 | 0.000000 | 0.993593 | 0.097477 | 1.000000 | 5 | 0 |
| 4 | 5 | 900 | 0.051282 | 0.222222 | 0.0 | 0.001318 | 0.000000 | 0.000000 | 0.001242 | 0.500000 | 7 | 0 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 6315 | 15128 | 760 | 0.022222 | 0.040000 | 0.0 | 0.629606 | 0.280000 | 0.993593 | 0.629606 | 0.000000 | 3 | 0 |
| 6317 | 15137 | 2481 | 0.030612 | 0.130435 | 0.0 | 0.005754 | 0.217391 | 0.993593 | 0.000010 | 0.878788 | 7 | 0 |
| 6318 | 15138 | 2481 | 0.055556 | 0.043478 | 0.0 | 0.015663 | 0.217391 | 0.993593 | 0.015663 | 0.000000 | 7 | 0 |
| 6319 | 15139 | 2481 | 0.076923 | 0.086957 | 0.0 | 0.068694 | 0.217391 | 0.993593 | 0.000415 | 0.000000 | 7 | 0 |
| 6320 | 15144 | 2481 | 0.016393 | 0.043478 | 0.0 | 0.340351 | 0.217391 | 0.993593 | 0.340351 | 0.000000 | 7 | 0 |
5646 rows × 12 columns
data_Nigatif=da[da['Class']==1]data_Nigatif| Record_ID | Auction_ID | Bidder_Tendency | Bidding_Ratio | Successive_Outbidding | Last_Bidding | Auction_Bids | Starting_Price_Average | Early_Bidding | Winning_Ratio | Auction_Duration | Class | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 7 | 12 | 900 | 0.137931 | 0.444444 | 1.0 | 0.768044 | 0.000000 | 0.000000 | 0.016311 | 1.000000 | 7 | 1 |
| 8 | 13 | 2370 | 0.121951 | 0.185185 | 1.0 | 0.035021 | 0.333333 | 0.993528 | 0.023963 | 0.944444 | 7 | 1 |
| 9 | 27 | 600 | 0.155172 | 0.346154 | 0.5 | 0.570994 | 0.307692 | 0.993593 | 0.413788 | 0.611111 | 7 | 1 |
| 10 | 37 | 2172 | 0.600000 | 0.562500 | 1.0 | 0.457631 | 0.000000 | 0.000000 | 0.457474 | 0.600000 | 7 | 1 |
| 13 | 40 | 2236 | 0.041322 | 0.208333 | 1.0 | 0.286045 | 0.250000 | 0.000000 | 0.286025 | 0.818182 | 7 | 1 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 6284 | 15047 | 1395 | 0.239130 | 0.343750 | 1.0 | 0.646898 | 0.437500 | 0.993593 | 0.600521 | 0.941176 | 1 | 1 |
| 6285 | 15052 | 2378 | 0.281690 | 0.740741 | 1.0 | 0.651391 | 0.333333 | 0.993593 | 0.651339 | 1.000000 | 7 | 1 |
| 6289 | 15060 | 1277 | 0.592593 | 0.615385 | 1.0 | 0.909158 | 0.307692 | 0.000000 | 0.003395 | 0.857143 | 7 | 1 |
| 6295 | 15070 | 342 | 0.200000 | 0.111111 | 0.5 | 0.011968 | 0.333333 | 0.000000 | 0.001817 | 0.833333 | 7 | 1 |
| 6316 | 15129 | 760 | 0.333333 | 0.160000 | 1.0 | 0.738557 | 0.280000 | 0.993593 | 0.686358 | 0.888889 | 3 | 1 |
675 rows × 12 columns
for col in da: plt.figure() sns.distplot(data_Positif[col],label='positif') sns.distplot(data_Nigatif[col],label='negatif') plt.legend()/home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning)
/home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:305: UserWarning: Dataset has 0 variance; skipping density estimate. warnings.warn(msg, UserWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms). warnings.warn(msg, FutureWarning) /home/rachida/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:305: UserWarning: Dataset has 0 variance; skipping density estimate. warnings.warn(msg, UserWarning)
d=data.copy()sns.countplot(x='Successive_Outbidding',hue='Class',data=d)#la on count le nombre d'aperstion de Auction_Duration pour les class 0 et 1 sns.heatmap(pd.crosstab(data['Class'],data['Auction_Duration']),annot=True,fmt='d')sns.pairplot(data)<seaborn.axisgrid.PairGrid at 0x7fb95c51e400>
da=data.copy()da=da.drop(columns=['Record_ID','Auction_ID','Bidder_Tendency','Auction_Duration','Bidder_ID'],axis=1)da.corr()| Bidding_Ratio | Successive_Outbidding | Last_Bidding | Auction_Bids | Starting_Price_Average | Early_Bidding | Winning_Ratio | Class | |
|---|---|---|---|---|---|---|---|---|
| Bidding_Ratio | 1.000000 | 0.604828 | -0.066541 | -0.347831 | -0.252289 | -0.147773 | 0.642905 | 0.569435 |
| Successive_Outbidding | 0.604828 | 1.000000 | 0.098941 | 0.065361 | 0.052263 | 0.056798 | 0.382002 | 0.901035 |
| Last_Bidding | -0.066541 | 0.098941 | 1.000000 | 0.297639 | 0.293323 | 0.950096 | -0.076726 | 0.097655 |
| Auction_Bids | -0.347831 | 0.065361 | 0.297639 | 1.000000 | 0.629086 | 0.298878 | -0.381442 | 0.044964 |
| Starting_Price_Average | -0.252289 | 0.052263 | 0.293323 | 0.629086 | 1.000000 | 0.302958 | -0.262655 | 0.042604 |
| Early_Bidding | -0.147773 | 0.056798 | 0.950096 | 0.298878 | 0.302958 | 1.000000 | -0.137005 | 0.053570 |
| Winning_Ratio | 0.642905 | 0.382002 | -0.076726 | -0.381442 | -0.262655 | -0.137005 | 1.000000 | 0.394122 |
| Class | 0.569435 | 0.901035 | 0.097655 | 0.044964 | 0.042604 | 0.053570 | 0.394122 | 1.000000 |
#sns.heatmap(data.corr())#da=data("")data.corr()| Record_ID | Auction_ID | Bidder_Tendency | Bidding_Ratio | Successive_Outbidding | Last_Bidding | Auction_Bids | Starting_Price_Average | Early_Bidding | Winning_Ratio | Auction_Duration | Class | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Record_ID | 1.000000 | -0.003776 | 0.011075 | -0.040123 | 0.005271 | 0.037588 | 0.048377 | 0.001265 | 0.031719 | -0.057151 | -0.012150 | -0.003731 |
| Auction_ID | -0.003776 | 1.000000 | -0.006902 | -0.021424 | -0.003175 | 0.070341 | 0.097558 | 0.016182 | 0.068427 | -0.039779 | 0.024918 | -0.007985 |
| Bidder_Tendency | 0.011075 | -0.006902 | 1.000000 | 0.293076 | 0.313510 | 0.044999 | 0.086564 | 0.073242 | 0.019978 | 0.212170 | 0.000244 | 0.295533 |
| Bidding_Ratio | -0.040123 | -0.021424 | 0.293076 | 1.000000 | 0.604828 | -0.066541 | -0.347831 | -0.252289 | -0.147773 | 0.642905 | -0.019205 | 0.569435 |
| Successive_Outbidding | 0.005271 | -0.003175 | 0.313510 | 0.604828 | 1.000000 | 0.098941 | 0.065361 | 0.052263 | 0.056798 | 0.382002 | 0.010091 | 0.901035 |
| Last_Bidding | 0.037588 | 0.070341 | 0.044999 | -0.066541 | 0.098941 | 1.000000 | 0.297639 | 0.293323 | 0.950096 | -0.076726 | 0.011454 | 0.097655 |
| Auction_Bids | 0.048377 | 0.097558 | 0.086564 | -0.347831 | 0.065361 | 0.297639 | 1.000000 | 0.629086 | 0.298878 | -0.381442 | 0.093331 | 0.044964 |
| Starting_Price_Average | 0.001265 | 0.016182 | 0.073242 | -0.252289 | 0.052263 | 0.293323 | 0.629086 | 1.000000 | 0.302958 | -0.262655 | 0.022990 | 0.042604 |
| Early_Bidding | 0.031719 | 0.068427 | 0.019978 | -0.147773 | 0.056798 | 0.950096 | 0.298878 | 0.302958 | 1.000000 | -0.137005 | 0.011296 | 0.053570 |
| Winning_Ratio | -0.057151 | -0.039779 | 0.212170 | 0.642905 | 0.382002 | -0.076726 | -0.381442 | -0.262655 | -0.137005 | 1.000000 | -0.023965 | 0.394122 |
| Auction_Duration | -0.012150 | 0.024918 | 0.000244 | -0.019205 | 0.010091 | 0.011454 | 0.093331 | 0.022990 | 0.011296 | -0.023965 | 1.000000 | 0.021145 |
| Class | -0.003731 | -0.007985 | 0.295533 | 0.569435 | 0.901035 | 0.097655 | 0.044964 | 0.042604 | 0.053570 | 0.394122 | 0.021145 | 1.000000 |
sns.clustermap(data.corr())#d=data[data.columns[data.dtypes == 'float']]for col in da : plt.figure() sns.lmplot(x='Winning_Ratio',y=col,hue='Class',data=da)da.corr()['Winning_Ratio']da.corr()['Winning_Ratio'].sort_values()da.describe()da.tail()da.nunique()da.isna().sum()Bidder_Tendency 0 Bidding_Ratio 0 Successive_Outbidding 0 Last_Bidding 0 Auction_Bids 0 Starting_Price_Average 0 Early_Bidding 0 Winning_Ratio 0 Auction_Duration 0 Class 0 dtype: int64
da.shape(6321, 10)
da["Bidding_Ratio"].sum()807.00000018
da1= da[da["Bidding_Ratio"]>=0.0]da["Bidding_Ratio"].sum()807.00000018
da1["Bidding_Ratio"].mean()0.12766967254864764
da1["Bidding_Ratio"].median()0.083333333
#da["Bidding_Ratio"].unique()da["Successive_Outbidding"].mean()0.10378104730264198
da["Successive_Outbidding"].sum()656.0
da["Successive_Outbidding"].unique()array([0. , 1. , 0.5])
da.groupby("Class").mean()| Bidder_Tendency | Bidding_Ratio | Successive_Outbidding | Last_Bidding | Auction_Bids | Starting_Price_Average | Early_Bidding | Winning_Ratio | Auction_Duration | |
|---|---|---|---|---|---|---|---|---|---|
| Class | |||||||||
| 0 | 0.122403 | 0.101775 | 0.016649 | 0.450286 | 0.227638 | 0.465605 | 0.423630 | 0.308242 | 4.597060 |
| 1 | 0.310979 | 0.344268 | 0.832593 | 0.570463 | 0.264797 | 0.533181 | 0.489674 | 0.865322 | 4.765926 |
da.dtypesBidder_Tendency float64 Bidding_Ratio float64 Successive_Outbidding float64 Last_Bidding float64 Auction_Bids float64 Starting_Price_Average float64 Early_Bidding float64 Winning_Ratio float64 Auction_Duration int64 Class int64 dtype: object
#da['Bidding_Ratio'].unique()da["Bidding_Ratio"].sum()da1= da[da["Bidding_Ratio"]<=0.1]da1["Bidding_Ratio"].sum()198.458038526
#on remarque que la variable Bidding_Ratio a une forte relation avec la fraude car #si le soumissionaire participe a des plus grande enchere il ya plus de fraude da1.groupby("Class").mean()| Bidder_Tendency | Bidding_Ratio | Successive_Outbidding | Last_Bidding | Auction_Bids | Starting_Price_Average | Early_Bidding | Winning_Ratio | Auction_Duration | |
|---|---|---|---|---|---|---|---|---|---|
| Class | |||||||||
| 0 | 0.103045 | 0.052705 | 0.009045 | 0.494900 | 0.308370 | 0.576249 | 0.483827 | 0.034685 | 4.678106 |
| 1 | 0.723214 | 0.084646 | 0.625000 | 0.793332 | 0.591654 | 0.995178 | 0.752455 | 0.225000 | 2.500000 |
#da['Successive_Outbidding'].unique()#da["Successive_Outbidding"].sum()da1= da[da["Successive_Outbidding"]<0.5]da1["Successive_Outbidding"].sum()0.0
#la aussi on remarque que si le enchérissseur ce surchere successivement avec des des#incriments > 0.5 la on remarque que les deux classe vont etre equiliberé avce des da1.groupby("Class").mean()| Bidder_Tendency | Bidding_Ratio | Successive_Outbidding | Last_Bidding | Auction_Bids | Starting_Price_Average | Early_Bidding | Winning_Ratio | Auction_Duration | |
|---|---|---|---|---|---|---|---|---|---|
| Class | |||||||||
| 0 | 0.313677 | 0.217836 | 1.0 | 0.766575 | 0.548595 | 0.883528 | 0.756554 | 0.286435 | 7.222222 |
| 1 | 0.330502 | 0.384018 | 1.0 | 0.583790 | 0.266077 | 0.524968 | 0.502975 | 0.869975 | 4.552106 |
da.groupby("Class").mean()| Bidder_Tendency | Bidding_Ratio | Successive_Outbidding | Last_Bidding | Auction_Bids | Starting_Price_Average | Early_Bidding | Winning_Ratio | Auction_Duration | |
|---|---|---|---|---|---|---|---|---|---|
| Class | |||||||||
| 0 | 0.122403 | 0.101775 | 0.016649 | 0.450286 | 0.227638 | 0.465605 | 0.423630 | 0.308242 | 4.597060 |
| 1 | 0.310979 | 0.344268 | 0.832593 | 0.570463 | 0.264797 | 0.533181 | 0.489674 | 0.865322 | 4.765926 |
da['Winning_Ratio'].sort_values()==0.5File "<ipython-input-151-cce7c492e51d>", line 1 da['Winning_Ratio'].sort_values()==0.5: ^ SyntaxError: invalid syntax
xxxxxxxxxx#da["Winning_Ratio"].sort_values()da1= da[da["Winning_Ratio"]>0.5]da1["Winning_Ratio"].sum()2288.228905924
da.groupby("Class").mean()| Bidder_Tendency | Bidding_Ratio | Successive_Outbidding | Last_Bidding | Auction_Bids | Starting_Price_Average | Early_Bidding | Winning_Ratio | Auction_Duration | |
|---|---|---|---|---|---|---|---|---|---|
| Class | |||||||||
| 0 | 0.122403 | 0.101775 | 0.016649 | 0.450286 | 0.227638 | 0.465605 | 0.423630 | 0.308242 | 4.597060 |
| 1 | 0.310979 | 0.344268 | 0.832593 | 0.570463 | 0.264797 | 0.533181 | 0.489674 | 0.865322 | 4.765926 |
da1.groupby("Class").mean()| Bidder_Tendency | Bidding_Ratio | Successive_Outbidding | Last_Bidding | Auction_Bids | Starting_Price_Average | Early_Bidding | Winning_Ratio | Auction_Duration | |
|---|---|---|---|---|---|---|---|---|---|
| Class | |||||||||
| 0 | 0.143960 | 0.191086 | 0.027892 | 0.376550 | 0.064999 | 0.244294 | 0.322229 | 0.877330 | 4.457011 |
| 1 | 0.298529 | 0.341568 | 0.834615 | 0.574663 | 0.265856 | 0.533797 | 0.494101 | 0.882963 | 4.781538 |
data.unique()--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-7-29a79790751a> in <module> ----> 1 data.unique() ~/anaconda3/lib/python3.8/site-packages/pandas/core/generic.py in __getattr__(self, name) 5137 if self._info_axis._can_hold_identifiers_and_holds_name(name): 5138 return self[name] -> 5139 return object.__getattribute__(self, name) 5140 5141 def __setattr__(self, name: str, value) -> None: AttributeError: 'DataFrame' object has no attribute 'unique'